/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.hero.jobweb.exception;

import com.hero.jobweb.config.ExceptionKey;
import static com.hero.jobweb.config.MessagesManger.getExceptionMessages;

/**
 * 系统基础异常
 * @author Volcano
 */
public class BaseException extends RuntimeException{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String exceptionKey;
	public BaseException(String key)
	{
		this(key,new Object[]{});
	}
	
	public BaseException(String key,Object ...para)
	{
		super(getExceptionMessages(key,para));
		this.exceptionKey=key;
	}
	
	public BaseException(ExceptionKey eKey)
	{
		this(eKey.toString());
	}
	
	public BaseException(ExceptionKey eKey,Object ...para)
	{
		this(eKey.toString(),para);
	}
	
	public String getExceptionKey()
	{
		return this.exceptionKey;
	}
	
	
}
